import requestMeeting, { request } from '@/plugins/axios'
import { FetchMeetingListItem } from './interface'

export const fetchApprovalConfs = async () =>
	request<{ list: FetchMeetingListItem[] }>({
		url: '/approval_confs/web',
		method: 'get',
		params: {},
	})
		.then((res) => res)
		.catch((res) => res)

export const fetchAuditOPT = async (param: {
	meeting_moid: string
	operation: number
	audit_by: string
	desc?: string
	desc_type?: number
}) =>
	requestMeeting({
		url: '/approval_confs/audit',
		method: 'put',
		data: param,
	}).then((res) => res)
